package com.qst.crop.service;

import com.github.pagehelper.PageInfo;
import com.qst.crop.entity.Order;
import jakarta.persistence.criteria.CriteriaBuilder;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

/**
 * (Order)表服务接口
 *
 * @author why
 * @since 2025-09-02 19:31
 */
public interface OrderService {


    PageInfo<Order> selectAll(Integer pageNum);

    PageInfo<Order> selectAllGoods(Integer pageNum);

    PageInfo<Order> selectAllByKeys(String keys,Integer pageNum);

    PageInfo<Order> selectGoodsByKeys(String keys,Integer pageNum,String name);

    Order selectById(Integer id);


    void  add(Order order);
    void update(Order order);
    void delete(Integer id);

    PageInfo<Order> selectByType(String type,Integer pageNum);

    PageInfo<Order> selectAllNeeds(Integer pageNum);

    PageInfo<Order> selectNeedsByKeys(String keys,Integer pageNum,String name);

    // 上架
    void takeUp(Integer orderId);

    // 下架
    void takeDown(Integer orderId);


}
